#include "pikaScript.h"
#include "FreeRTOS.h"
#include "task.h"
#include "pika_platform_port.h"
#include "at32f403a_407_board.h"

void* pika_platform_malloc(size_t size) {
    return pvPortMalloc(size);
}

void pika_platform_free(void* ptr) {
    vPortFree(ptr);
}

char pika_platform_getchar(void){
    while(usart_flag_get(PRINT_UART, USART_RDBF_FLAG) == RESET);
    return usart_data_receive(PRINT_UART);
}
